package dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class Dao {

	private static EntityManagerFactory emf;
	private static EntityManager em;
	
	public static void initialize(){
		emf= Persistence.createEntityManagerFactory("myPersistenceUnit");
		em=emf.createEntityManager();
	}
	
	public static EntityManager getEntityManager(){
		return em;
	}

}
